﻿Imports System.Windows.Forms
Imports JIRAClient.com.atlassian.jira.SOAP.v2

'Urls

Public Class formMain
    Const url1 = "https://jira.atlassian.com/rpc/soap/jirasoapservice-v2"
    Const Url2 = "http://www.spagoworld.org/jira/rpc/soap/jirasoapservice-v2"

    Private Sub formMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        NeoTabWindow1.Renderer = NeoTabControlLibrary.AddInRendererManager.LoadRenderer(IO.Path.Combine(Application.StartupPath, "NeoTabControlLibrary.Renderer.Avast.dll"), "AvastRendererVS3")
        'a ver estas modificaciones

        Dim j As New com.atlassian.jira.SOAP.v2.JiraSoapServiceService
        j.Url = Url2
        Dim token As String = j.login("enriquebj.spw", "pololo")

        Dim ServerInfo As RemoteServerInfo
        ServerInfo = j.getServerInfo(token)
        'MessageBox.Show(ServerInfo.serverTime.serverTime)
        'Dim config As RemoteConfiguration = j.getConfiguration(token)
        'PropertyGrid1.SelectedObject = config
        Dim filters As RemoteFilter() = j.getFavouriteFilters(token)
        PropertyGrid1.SelectedObject = j

        Dim ProjectKey As String = "SPAGO"
        Dim p As RemoteProject = j.getProjectByKey(token, ProjectKey)
        Dim issues = j.getIssuesFromJqlSearch(token, "project = " & ProjectKey, 50)
        For Each issue In issues
            lvIssues.Items.Add(New IssueListViewItem(issue))
        Next
    End Sub
End Class